package com.apache.bid.controller.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.apache.bid.controller.BaseSupperAction;
import com.apache.bid.entity.BidPrintTemplate;
import com.apache.bid.manager.BidPrintTemplateManager;
import com.apache.bid.manager.UnityBaseManager;

@Controller
@RequestMapping("/admin/template")
public class BidPrintTemplateAction extends BaseSupperAction<BidPrintTemplate> {

	@Autowired
	private BidPrintTemplateManager bidPrintTemplateManager;

	@Override
	protected UnityBaseManager<BidPrintTemplate> getBaseManager() {
		return bidPrintTemplateManager;
	}

	protected String getCommBoxValue(BidPrintTemplate item, String type) {
		if ("id".equals(type)) {
			return item.getTemplateId();
		} else {
			return item.getTemplateName();
		}
	}

}
